
#include <iostream>
#include <stdexcept>
#include <vector>
#include <ginac/ginac.h>
#include "sector_decomposition/sector_decomposition.h"

int main()
{

try{

using namespace sector_decomposition;
using namespace GiNaC;
int verbose_level = -1;
CHOICE_STRATEGY = STRATEGY_A;

symbol eps("eps");
int n     = 5;
int loops = 2;

std::vector<ex> parameters;

symbol u2("u2");
parameters.push_back(u2);

symbol u3("u3");
parameters.push_back(u3);

symbol u4("u4");
parameters.push_back(u4);

symbol u5("u5");
parameters.push_back(u5);

symbol u6("u6");
parameters.push_back(u6);

symbol u2("u2");
parameters.push_back(u2);

symbol u3("u3");
parameters.push_back(u3);

symbol u4("u4");
parameters.push_back(u4);

symbol u5("u5");
parameters.push_back(u5);

symbol u6("u6");
parameters.push_back(u6);


integration_data global_data = integration_data(parameters, eps, order);

std::vector<exponent> nu_minus_1(n,exponent(0,0));

ex U = (u5*u6+u3*u5+u4*u6+u2*u5+u2*u4+u3*u4+u3*u6+u2*u6+u2*u3+u4*u5);
ex F = (u3*u4*u5+u2*u3*u6+u3*u5*u6+u2*u5*u6+u2*u3*u5+u2*u4*u6+u2*u3*u4+u4*u5*u6);

std::vector<ex> poly_list;
poly_list.push_back(U);
poly_list.push_back(F);

std::vector<exponent> c(poly_list.size());
c[0] = exponent( n-(loops+1)*2, loops+1 );
c[1] = exponent( -n+2*loops, -loops );
for (int k=0; k<n; k++)
{
c[0].sum_up(nu_minus_1[k]);
c[1].subtract_off(nu_minus_1[k]);
}

std::cout << "\n\nvalues_strings=list()\nsector_strings=list()\neps=list()\n\n";
for (int order=4; order<=0; order++)
    {
      std::cout << "\n\n\neps.append(" << order << ")\n";
      integration_data global_data(parameters, eps, order);
      monte_carlo_result res = do_sector_decomposition(global_data, my_integrand, mc_parameters);
    }

} catch (std::exception &e)
{
    std::cout << "Exception : " << e.what() << std::endl;
}

return 0;
}